using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// <summary>
/// Summary description for NguoiDung_Ctl
/// </summary>
public class NguoiDung_Ctl
{

    private NguoiDung_Info _info = new NguoiDung_Info();

    public NguoiDung_Info Info
    {
        get { return _info; }
        set { _info = value; }
    }
    private NguoiDung_Data _data = new NguoiDung_Data();

    public void insert()
    {
        _data.insert(_info);
    }

    public DataTable LayDanhSachNguoiDung()
    {
        DataTable dt = new DataTable();
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter = _data.LayDanhSachNguoiDung();
        adapter.Fill(dt);
        return dt;
    }

    public DataTable ThongTinNguoiDung(int Ma)
    {
        DataTable dt = new DataTable();
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter = _data.LayThongTinNguoiDung(Ma);
        adapter.Fill(dt);
        return dt;
    }

    public bool KichHoatTaiKhoan(string MaKichHoat)
    {
        return _data.KichHoatTaiKhoan(MaKichHoat);
    }

    public int KiemTraNguoiDungHopLe()
    {
        return _data.KiemTraNguoiDungHopLe(_info.TenDangNhap, _info.Email, _info.CMND);
    }

	public NguoiDung_Ctl()
	{
		//
		// TODO: Add constructor logic here
		//
	}
}
